﻿/*=================================================================================================
// <copyright company="AltaModa Technologies, LLC">
//	Copyright (c) AltaModa Technologies, LLC. All rights reserved.
//	http://www.AltaModaTech.com/
// </copyright>
// 
//	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
//	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
//	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
//	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
//	CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
//	SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
//	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
//	OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
//	POSSIBILITY OF SUCH DAMAGE.
//===============================================================================================*/


namespace AMT.Web.Security
{
	public class PermitAllRoleProvider : System.Web.Security.RoleProvider
	{
		public override string Description
		{
			get
			{
				return "AMT.Web.Security.Debug.PermitAllRoleProvider - DO NOT use in production systems";
			}
		}


		public override void AddUsersToRoles(string[] usernames, string[] roleNames)
		{
			return;
		}

		public override string ApplicationName { get; set; }

		public override void CreateRole(string roleName)
		{
			return;
		}

		public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
		{
			return true;
		}

		public override string[] FindUsersInRole(string roleName, string usernameToMatch)
		{
			return new string[] { usernameToMatch };
		}

		public override string[] GetAllRoles()
		{
			return null;
		}

		public override string[] GetRolesForUser(string username)
		{
			return new string[] { "flimflamflumox" };
		}

		public override string[] GetUsersInRole(string roleName)
		{
			return new string[] { string.Empty };
		}

		public override bool IsUserInRole(string username, string roleName)
		{
			return true;
		}

		public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
		{
			return;
		}

		public override bool RoleExists(string roleName)
		{
			return true;
		}
	}
}
